package com.itheima.dao;

import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.CheckGroup;
import com.itheima.pojo.CheckItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CheckGroupDao {

    List<CheckGroup> findAll();

    List<CheckGroup> findPage(QueryPageBean queryPageBean);

    void addGroupAndGetId(CheckGroup checkGroup);

    void addGroupIdAndItemId(@Param("groupId") int groupId,@Param("itemIds") Integer[] itemIds);

    CheckGroup findById(Integer id);

    //根据groupId查Items
    List<CheckItem> findItemsByGroupId(Integer groupId);

    //修改组
    int updateGroup(CheckGroup checkGroup);

    //根据groupId删除 group_item数据
    void deletItemByGroupId(Integer groupId);

}
